//package com.timothy.shiro;
//
//import java.io.IOException;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//import org.apache.shiro.SecurityUtils;
//import org.apache.shiro.session.Session;
//import org.apache.shiro.web.util.WebUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//
///**
// * 功能描述: 返回sid
// * @author zhangzh
// * @version [1.0, 2017/5/19]
// */
//@Controller
//@RequestMapping("/cle")
//public class PlatformController {
//	private static final Logger log = LoggerFactory.getLogger(PlatformController.class);
//
//	@RequestMapping(value = "/token", method = RequestMethod.GET)
//	public void token(HttpServletRequest request, HttpServletResponse response) {
//		String service = WebUtils.getCleanParam(request, "service");
//		// String rememberMe = HttpHelper.getCookieValue(request, "rememberMe");
//		Session session = SecurityUtils.getSubject().getSession();
//		session.setAttribute("hasSyn", true); // 将hasSyn为true设置到session中，CasFilter会从Session中取该值
//		try {
//			WebUtils.issueRedirect(request, response, service + "?jsid=" + session.getId());
//			log.info("s-url:" + service + "?jsid=" + session.getId());
//		} catch (IOException e) {
//			log.error(e.getMessage(), e);
//		}
//	}
//}
